package org.jsoncrypto;

import javax.crypto.SecretKey;

import org.json.JSONObject;

public class JcLibAesGcm extends JcLibEnc_AEAD {
	JcLibAesGcm(JSONObject header, String encStr) throws JcBaseException {
		super(header, encStr);
	}

	public JcLibAesGcm(String encodedJwtHeaderSegment, String encodedJwtKeySegment,
	    String encodedJwtIvSegment,
			String encodedJwtCryptoSegment, String encodedJwtIntegritySegment)
			throws JcBaseException {
		super(encodedJwtHeaderSegment, encodedJwtKeySegment, encodedJwtIvSegment,
				encodedJwtCryptoSegment, encodedJwtIntegritySegment);
	}

	@Override
	String encrypt(byte[] contentBytes, SecretKey contentEncryptionKey,
			String encodedJweEncryptedKey,       String encodedJwtIvSegment) throws JcBaseException {
    return JcBase.encryptAesGcm(contentBytes, mHeaderStr,
				contentEncryptionKey, encodedJweEncryptedKey, encodedJwtIvSegment );
	}
}
